/**
 * @param {number} columnNumber
 * @return {string}
 */
var convertToTitle = function(columnNumber) {
  let result = "";
  function numToAlpha(num) {
    return String.fromCharCode(65 + num);
  }
  while(columnNumber) {
    result = numToAlpha((columnNumber - 1) % 26) + result;
    columnNumber = Math.floor((columnNumber - 1) / 26);
  }
  return result;
};
let columnNumber = 1;
console.log(convertToTitle(columnNumber));
columnNumber = 28;
console.log(convertToTitle(columnNumber));
columnNumber = 701;
console.log(convertToTitle(columnNumber));
columnNumber = 2147483647;
console.log(convertToTitle(columnNumber));
